/*
 * @lc app=leetcode.cn id=441 lang=csharp
 *
 * [441] 排列硬币
 */

// @lc code=start
public class Solution {
    public int ArrangeCoins(int n) {
        return (int)((Math.Sqrt(1 + 8.0 * n) - 1) / 2);
    }
}
// @lc code=end

